Skip to content

Conversation

@adietish
Copy link
Collaborator

@adietish adietish commented Oct 30, 2025

fixes eclipse-che/che#23558

out of the currently 2300 added lines, 1600 are tests 😄

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 43.89535% with 193 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.47%. Comparing base (71098f6) to head (a46917a).
⚠️ Report is 259 commits behind head on main.

Files with missing lines Patch % Lines
...hat/devtools/gateway/kubeconfig/KubeConfigUtils.kt 1.44% 68 Missing ⚠️
...ools/gateway/view/steps/DevSpacesServerStepView.kt 0.00% 56 Missing ⚠️
...vtools/gateway/openshift/OpenShiftClientFactory.kt 0.00% 18 Missing ⚠️
.../redhat/devtools/gateway/kubeconfig/FileWatcher.kt 58.97% 13 Missing and 3 partials ⚠️
...dhat/devtools/gateway/view/ui/FilteringComboBox.kt 57.57% 12 Missing and 2 partials ⚠️
...t/devtools/gateway/kubeconfig/KubeConfigEntries.kt 91.78% 0 Missing and 6 partials ⚠️
...t/devtools/gateway/kubeconfig/KubeConfigMonitor.kt 87.80% 4 Missing and 1 partial ⚠️
...at/devtools/gateway/DevSpacesConnectionProvider.kt 0.00% 4 Missing ⚠️
.../com/redhat/devtools/gateway/openshift/Projects.kt 0.00% 2 Missing ⚠️
...n/com/redhat/devtools/gateway/openshift/Cluster.kt 83.33% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##            main     #206       +/-   ##
==========================================
+ Coverage   0.00%   18.47%   +18.47%     
==========================================
  Files          4       35       +31     
  Lines         26     1402     +1376     
  Branches       0      239      +239     
==========================================
+ Hits           0      259      +259     
- Misses        26     1114     +1088     
- Partials       0       29       +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adietish adietish force-pushed the issue-23558 branch 27 times, most recently from 778cfa0 to c6f7184 Compare November 3, 2025 23:22
@adietish adietish force-pushed the issue-23558 branch 3 times, most recently from 47edf9b to b76f344 Compare November 7, 2025 19:20
@adietish adietish requested a review from vrubezhny November 7, 2025 19:21
@adietish adietish force-pushed the issue-23558 branch 10 times, most recently from 180cdb6 to 0f82978 Compare November 10, 2025 17:34
@adietish adietish marked this pull request as ready for review November 10, 2025 18:28
@adietish
Copy link
Collaborator Author

adietish commented Nov 10, 2025

@vrubezhny, @azatsarynnyy: please review. To test it:

  1. EXEC: launch gateway plugin, get to the wizard page where you provide cluster & token
  2. EXEC: change kube config (add/remove/change cluster/token, etc.) or any file listed in KUBECONFIG env variable using an (external) tool while keeping wizard opened.
  3. ASSERT: selected cluster/token should reflect the new values
  4. ASSERT: "Next"-button should get enabled/disabled when you select a cluster and provide (or remove) a token
    Thanks!

ps. KUBECONFIG env variable looks as follows (on MacOS, set it in ~/.zprofile):

export KUBECONFIG=${HOME}/.kube/config:${HOME}/.kube/minikube.yaml

@vrubezhny
Copy link
Collaborator

Token doesn't get renewed from Kube config when it's changed while you were at Select running DevWorkspace wizard page and press Back button: you'll still see an old token value.

Steps to reproduce:

  • Open Connect to Dev Spaces wizard - see some cluster selected together with the related token value (which is up-to-date)
  • Press Check connection ans continue to go to the Select running DevWorkspace wizard page.
  • While on the page, request the new token, copy-paste its value to your Kube config and save it.
  • Press Back on the Select running DevWorkspace wizard page to go back to the cluster selection wizard page
  • Fail: Connecting to OpenShift API server wizard page still shows the OLD token value for the selected server

@adietish
Copy link
Collaborator Author

adietish commented Nov 12, 2025

@vrubezhny: thx for findining this! Fixed it. I now start watching kube config files when the wizard page is shown and stop when it is hidden.
Please re-review/test :)

Copy link
Collaborator

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

Cluster wizard page:
  - cluster/token are updated if kube config or any file listed in `KUBECONFIG` env var is changed
  - "Next"-button is enabled/disabled as you provide cluster & token

Signed-off-by: Andre Dietisheim <[email protected]>
Assisted by: gemini-cli
Assisted by: cursor
Assisted by: qwen-code
@adietish
Copy link
Collaborator Author

adietish commented Nov 12, 2025

added a test and printing of the full stacktrace if a test fails (suggested by @vrubezhny)

@adietish adietish merged commit 33ce750 into redhat-developer:main Nov 12, 2025
5 checks passed
@adietish adietish deleted the issue-23558 branch November 12, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gateway: cannot change my kube config and check connection again

3 participants